Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Backfacing Styles

A model's backfacing style determines whether or not a renderer draws shapes (typically polygons) that face away from a view's camera. QuickDraw 3D defines constants for the backfacing styles that are currently available.

typedef enum TQ3BackfacingStyle {
    kQ3BackfacingStyleBoth,
    kQ3BackfacingStyleRemove,
    kQ3BackfacingStyleFlip
} TQ3BackfacingStyle;

The default value, kQ3BackfacingStyleBoth , specifies that the renderer should draw shapes that face either toward or away from the camera. The backfacing shapes may be illuminated only dimly or not at all, because their face normals point away from the camera.

The constant kQ3BackfacingStyleRemove specifies that the renderer should not draw or otherwise process shapes that face away from the camera. (This process is called backface culling. ) This rendering style is likely to be significantly faster than the other two backfacing styles (because up to half the shapes are not rendered) but can cause holes to appear in visible backfacing objects.

An object that faces away from the camera might still be visible. Accordingly, backface culling is not the same as hidden surface removal.

The constant kQ3BackfacingStyleFlip specifies that the renderer should draw shapes that face toward or away from the camera. The face normals of backfacing shapes are inverted so that they face toward the camera.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |